﻿@{
    ViewBag.Title = "NoticeDetailPage";
    Layout = "~/Views/Shared/_LayoutChild.cshtml";
}
@model Agro.Models.T_Notice
@section head {
    <style type="text/css">
        td
        {
            padding: 4px;
        }
        a, a:link, a:active, a:hover
        {
            color: #999999;
            text-decoration: none;
        }
        .subhead
        {
            margin-right: 20px;
            color: #999999;
        }
    </style>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#Notice_Content").css("width", ($(document.body).width() - 13) + "px");
            $("#Notice_Content").css("height", ($(document.body).height() - 150) + "px");
            if ('@Model.Notice_AttachmentName'.length > 0)
            $("#showdown").html("附件：<a href='javascript:download(@Model.Notice_ID)'>@Model.Notice_AttachmentName</a>");

        });
        function doZoom(size) {
            var value = size + 'px';
            $("#Notice_Content").css("font-size", value);
            $("#Notice_Content *").css("font-size", value); //$("#Notice_Content *")用于获取所有下级节点，包括了子节点和孙节点。
        }

        function download(id) {
            $("#frmDownFile").attr("src", '/SystemManage/Notice/DownLoadFile?id=' + id);
            //            window.location.href = '/FileManage/File/DownLoadFile?id=' + id;

        }
    </script>
}
<div class="ui-layout-center" style="overflow: hidden; width: 100%;">
    <table style="width: 100%; height: 100%;">
        <tr>
            <td valign="top">
                <table style="width: 99%;">
                    <tr>
                        <td style="font-weight: bold; font-size: 20px; width: auto; color: #ff0000;" align="center">
                            @Model.Notice_Title
                        </td>
                    </tr>
                    <tr>
                        <td style="border-top-style: solid; border-top-width: 1px; border-top-style: dotted;">
                            <span class='subhead'>发布日期： @Model.Notice_CreateDate</span> <span class='subhead'>来源：@ViewBag.PublishOrg</span>
                            <span class='subhead'>【<a href="#" onclick="javascript:doZoom(22)">大</a>&nbsp;<a
                                href="#" onclick="javascript:doZoom(16)">中</a>&nbsp;<a href="#" onclick="javascript:doZoom(12)">小</a>】
                            </span>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <div style="overflow: auto; line-height: 25px;" id="Notice_Content">
                                @Html.Raw(Model.Notice_Content)</div>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td id="showdown">
            </td>
        </tr>
    </table>
</div>
<iframe id='frmDownFile' frameborder='0' width='0' height='0' marginheight='0' marginwidth='0'
    scrolling="auto" style="margin: 0px; margin-bottom: -2px;"></iframe>
